using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class ScoreListener : RPCListener<ScoreEvent> {

	// Singleton pattern.
	private static ScoreListener instance;
	public static ScoreListener inst() {
		if (instance == null) {
			GameObject obj = new GameObject();
			obj.AddComponent<ScoreListener>();
			instance = obj.GetComponent<ScoreListener>();
		}
		return instance;
	}
	
	// Constructor.
	private ScoreListener() {}
	
	// Define more convinient methods for adding and notifying listeners.
	public void add(System.Action<ScoreEvent> l) 	{base.add (0, l);}
	public void notify(ScoreEvent ev) 				{base.notify(0, ev);}
}
